Char array gets cleared after function gets() on C